home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 3.9 KB | 130 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWStrs.tpp
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 3/28/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #include <Types.h>
- #endif
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- #ifndef FWMATH_H
- #include "FWMath.h"
- #endif
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- #ifndef FWSTRTOO_H
- #include "FWStrToo.h"
- #endif
-
- //========================================================================================
- // CLASS FW_TBoundedString
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::~FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::~FW_TBoundedString()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::FW_TBoundedString() :
- FW_CString()
- {
- fRepresentation = fStorage;
- fCapacity = tCapacity*FW_kMedianCharacterSize;
- SetLength(0, 0);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::FW_TBoundedString(
- const FW_TBoundedString<tCapacity> &string) :
- FW_CString()
- {
- fRepresentation = fStorage;
- fCapacity = tCapacity*FW_kMedianCharacterSize;
- SetLength(0, 0);
- Append(string);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::FW_TBoundedString(
- const FW_CString &string) :
- FW_CString()
- {
- fRepresentation = fStorage;
- fCapacity = tCapacity*FW_kMedianCharacterSize;
- SetLength(0, 0);
- Append(string);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::FW_TBoundedString(const FW_Char *items,
- FW_CharacterCount numberItems) :
- FW_CString()
- {
- fRepresentation = fStorage;
- fCapacity = tCapacity*FW_kMedianCharacterSize;
- SetLength(0, 0);
- Append(items, numberItems);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::FW_TBoundedString
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_TBoundedString<tCapacity>::FW_TBoundedString(const FW_Char *items) :
- FW_CString()
- {
- fRepresentation = fStorage;
- fCapacity = tCapacity*FW_kMedianCharacterSize;
- SetLength(0, 0);
- Append(items, FW_StringLength(items));
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TBoundedString<tCapacity>::GrowCapacity
- //----------------------------------------------------------------------------------------
-
- template <unsigned short tCapacity>
- FW_ByteCount FW_TBoundedString<tCapacity>::GrowCapacity(FW_ByteCount capacityNeeded)
- {
- return tCapacity*FW_kMedianCharacterSize;
- }
-